<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>弹性盒模型</title>
    <!--弹性盒模型提供了比浮动布局更便利的布局方式-->
    <style type="text/css">
        #box{
            background: deeppink;
            height: 500px;
            display: flex;
            /*使用弹性盒子解决垂直水平居中问题*/
            justify-content: center;
            align-items: center;
            /* 使用justify-content属性设置横轴排列方式
             flex-start | flex-end | center | space-between | space-around;*/
            /*align-items: flex-start | flex-end | center | baseline | stretch;*/
        }
        .box1{
            height: 200px;
            width: 200px;
            background: black;
        }.box2{
            height: 200px;
            width: 200px;
            background: blue;
        }.box3{
            height: 200px;
            width: 200px;
            background: red;
        }
    </style>
</head>
<body>
    <div id="box">
        <div class="box1">div1</div>
        <div class="box2">div2</div>
        <div class="box3">div3</div>
    </div>
</body>
</html>